import React from 'react'
import PropTypes from 'prop-types'
import { request } from 'utils'
import { apiPrefix } from 'utils/config'
import { connect } from 'umi'
import { withI18n } from '@lingui/react'
import { Row, Card, Tag, Form, Input, Button, Col } from 'antd'
import api from '@/services/api'
import { Page } from 'components'
import { formItemLayout, formItemLayoutL, tailLayout } from '@/utils/helper'
import styles from './index.less'

@withI18n()
@connect(({ post, loading }) => ({ post, loading }))
class userDer extends React.Component {
  state = {
    keys: [],
    setIsModalVisible: false, //弹框
    from: {},
  }

  render() {
    const { location, i18n } = this.props
    const { data, from } = this.state
    return (
      <div>
        <Form {...formItemLayoutL} name="basic">
          <Card title={i18n.t`Deploy-Jbxx`} className={styles.Po_bt}>
            <Form.Item label={i18n.t`Deploy-zxIP`} name="form.center_id">
              <Input disabled />
            </Form.Item>
            <Form.Item label={i18n.t`Deploy-bbh`} name="form.soft_version">
              <Input disabled />
            </Form.Item>
            <Form.Item label={i18n.t`Deploy-rz`} name="form.access_time">
              <Input disabled />
            </Form.Item>
          </Card>
          <Card title={i18n.t`Deploy-bssz`} className={styles.Po_bt}>
            <Form.Item label={i18n.t`Deploy-bsqy`} name="form.address">
              <Input disabled />
            </Form.Item>
            <Form.Item label={i18n.t`Deploy-bsdz`} name="form.address">
              <Input />
            </Form.Item>
            <Form.Item label={i18n.t`Deploy-yzbm`} name="form.address_code">
              <Input />
            </Form.Item>
            <Form.Item label={i18n.t`Deploy-bsdw`} name="form.organs">
              <Input />
            </Form.Item>
            <Form.Item label={i18n.t`Deploy-lxr1`} name="form.name">
              <Input />
            </Form.Item>
            {/* 联系人 */}
            <Form.Item label={i18n.t`Deploy-yx`} name="form.email">
              <Input />
            </Form.Item>
            <Form.Item label={i18n.t`Deploy-dh`} name="form.phone">
              <Input />
            </Form.Item>
            <Form.Item label={i18n.t`Deploy-zw`} name="form.position">
              <Input />
            </Form.Item>
            <Form.Item label={i18n.t`Deploy-lxr2`} name="form.name">
              <Input />
            </Form.Item>
            <Form.Item label={i18n.t`Deploy-yx`} name="form.email">
              <Input />
            </Form.Item>
            <Form.Item label={i18n.t`Deploy-dh`} name="form.phone">
              <Input />
            </Form.Item>
            <Form.Item label={i18n.t`Deploy-zw`} name="form.position">
              <Input />
            </Form.Item>
            <Form.Item {...tailLayout}>
              <Button type="primary">保存</Button>
            </Form.Item>
          </Card>
          <Card title="CPU" className={styles.Po_bt}>
            <Row className={styles.Po_bt}>
              <Col span={3}>ID: 0</Col>
              <Col span={3}>核心数：8个</Col>
              <Col span={3}>频率: 1.6 GHz</Col>
            </Row>
          </Card>
          <Card title="内存" className={styles.Po_bt}>
            <div>
              {' '}
              <span>容量: 31983MB</span>
            </div>
          </Card>
          <Card title="硬盘" className={styles.Po_bt}>
            <Row>
              <Col span={3}>容量: 1863GB</Col>
              <Col span={3}>序列号：WCC6N3CYKAHX</Col>
            </Row>
          </Card>
          <Card title="网络" className={styles.Po_bt}>
            <Row className={styles.Po_bt}>
              <Col span={3}>IP地址:192.168.2.36</Col>
              <Col span={3}>子网掩码:192.168.2.36</Col>
              <Col span={3}>网关:192.168.2.36</Col>
              <Col span={3}>MAC地址:e8:61:1f:30:81:f4</Col>
            </Row>
            <Row>
              <Col span={3}>IP地址:192.168.2.36</Col>
              <Col span={3}>子网掩码:192.168.2.36</Col>
              <Col span={3}>网关:192.168.2.36</Col>
              <Col span={3}>MAC地址:e8:61:1f:30:81:f4</Col>
            </Row>
          </Card>
        </Form>
      </div>
    )
  }
}
userDer.propTypes = {
  post: PropTypes.object,
  loading: PropTypes.object,
  location: PropTypes.object,
  dispatch: PropTypes.func,
}
export default userDer
